# Contributor: Celeste <cielesti@protonmail.com>
# Maintainer: Celeste <cielesti@protonmail.com>
pkgname=py3-expandvars
pkgver=0.12.0
pkgrel=0
pkgdesc="Expand system variables Unix style"
url="https://pypi.org/project/expandvars/"
arch="noarch"
license="MIT"
makedepends="py3-gpep517 py3-hatchling"
checkdepends="py3-pytest"
subpackages="$pkgname-pyc"
source="https://github.com/sayanarijit/expandvars/archive/v$pkgver/py3-expandvars-$pkgver.tar.gz"
builddir="$srcdir/expandvars-$pkgver"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	python3 -m venv --clear --without-pip --system-site-packages .testenv
	.testenv/bin/python3 -m installer .dist/*.whl
	.testenv/bin/python3 -m pytest
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/*.whl
}

sha512sums="
1bf3688065212e988e2cad93402c17def8636a621562bf1689af48a6e526243bfb7bcfab9f21cd1a69e70909eb823fdf4002cb0b3b314cf7c9f3171ce0a1ca90  py3-expandvars-0.12.0.tar.gz
"
